﻿// DlgLogin.cpp: 实现文件
//

#include "pch.h"
#include "afxdialogex.h"
#include "DlgLogin.h"
#include "MFCExp1.h"


// DlgLogin 对话框

IMPLEMENT_DYNAMIC(DlgLogin, CDialogEx)

DlgLogin::DlgLogin(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_DIALOGIN, pParent)
{

}

DlgLogin::~DlgLogin()
{
}

void DlgLogin::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(DlgLogin, CDialogEx)
	ON_BN_CLICKED(IDOK, &DlgLogin::OnBnClickedOk)
END_MESSAGE_MAP()


// DlgLogin 消息处理程序


void DlgLogin::OnBnClickedOk()
{
	CString name;
	GetDlgItemText(IDC_EDIT1, name);
	CString passWd;
	GetDlgItemText(IDC_EDIT2, passWd);
	if (name != "123" || passWd != "123") {
		MessageBox(L"用户名或密码错误",L"提示");
		return;
	}

	CDialogEx::OnOK();//EndDialog 或 this->EndDialog
}
